package handin07;

public class Activity implements IActivity {
	
	private String name;
	private double price;
	private IEmployee trainer;	

	public Activity(String name, double price, IEmployee trainer) 
	{
		super();
		this.name = name;
		this.price = price;
		this.trainer = trainer;
	}

	@Override
	public String getName() 
	{
		return name;
	}

	@Override
	public double getPrice() 
	{
		return price;
	}

	@Override
	public IEmployee getTrainer() 
	{
		return trainer;
	}
	
	@Override
	public boolean equals(Object c) {
		if(this == c){
			return true;
		} else if(c instanceof Activity){
			Activity other = (Activity) c;
			if(other.getName().equalsIgnoreCase(this.getName())){
				return true;				
			}
		}
		return false;
	}
	
}
